package com.czh.controller;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("code-service")
@RequestMapping("/code")
public interface CodeFeignApi {

    @GetMapping("/create/{email}")
    boolean create(@PathVariable String email);

    @GetMapping("/validate/{email}/{code}")
    int validate(@PathVariable String email, @PathVariable String code);
}
